<div class="content gzt_main">
    <div class="layui-card gzt_header layui-row">
        <div class="item layui-col-md6 active">
            <i class="icon"></i>
            <span>上传工资表</span>
            <div class="line"></div>
        </div>
        <div class="item layui-col-md6">
            <i class="icon"></i>
            <span>核对工资表</span>
            <div class="line"></div>
        </div>
        <div class="item2">
            <i class="icon"></i>
            <span>发放工资表</span>
        </div>
    </div>
    <form id="post-form" class="layui-form gzt_form layui-col-space25" role="form" data-toggle="validator" method="POST" action="{:url('manage/payslip_add')}">
        <div class="layui-card gzt_main2">
            <div class="layui-card-header">基本信息</div>
            <div class="layui-card-body">
                <div class="layui-form-item">
                    <label class="layui-form-label">发薪类型</label>
                    <div class="layui-input-inline">
                        <select name="row[payslip_type]" lay-filter="payslip_type" data-rule="required" data-msg-required="请选择类型">
                            <option value="">请选择类型</option>
                            {if $payslip_type}
                            {foreach $payslip_type as $item}
                            <option value="{$item.id}">{$item.name}</option>
                            {/foreach}
                            {/if}
                        </select>
                    </div>
                    <a class="sz_but">设置</a>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">月份</label>
                    <div class="layui-input-inline">
                        <input type="text" id="render" name="row[month]" placeholder="请选择月份" class="layui-input" data-rule="required" data-msg-required="请选择月份">
                        <i class="layui-icon layui-icon-date"></i>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">导入工资表</label>
                    <div class="layui-input-block">
                        <input type="hidden" name="row[file]" value="" data-rule="required" data-msg-required="请上传工资表">
                        <a class="upload_butt" id="file">选择文件</a>
                        <a class="upload_url color_EF4033"></a>
                        <a class="upload_alert">查看文件上传要求</a>
                        <ul>
                            <li>若使用已创建的工资表，则必须包含<span class="color_EF4033">【姓名】</span>、<span class="color_EF4033">【账号】</span>和<span class="color_EF4033">【实发金额】</span>列，为区分重名员工，请务必输入员工<span class="color_EF4033">【账号】</span>列再上传。</li>
                            <li>若没有工资表模版，可点击下方<span class="color_4873C1">【下载模版】</span></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="add_but_box">
            <a href="{:url('manage/payslip_template')}" class="layui-btn layui-btn-primary">下载模版</a>
            <button type="submit" class="layui-btn layui-btn-determine gzt_upload_but">上传工作表</button>
        </div>
    </form>
</div>

<div class="pop fxlx_pop">
    <div class="pop_content">
        <form id="type-form" class="layui-form" role="form" data-toggle="validator" method="POST" action="{:url('manage/payslip_type')}">
            <div class="layui-card-header">发薪类型</div>
            <div class="close iconfont icon-guanbi"></div>
            <div class="layui-card-body">
                <div class="fxlx_item layui-clear">
                    <input type="text" placeholder="请输入发薪类型名称" id="add_name" class="layui-input">
                    <a class="layui-btn add_but">添加</a>
                </div>
                <div class="fxlx_item2">
                    <table class="layui-table layui-table1 type_list fieldlist" data-template="files_tpl" data-name="row[payslip_type]" lay-skin="line" lay-even="">
                        <tr>
                            <td>发薪类型</td>
                            <td width="200" class="text-center">操作</td>
                        </tr>
                        <tr>
                            <td colspan="2" style="display: inherit"><a href="javascript:;" class="btn-append"></a></td>
                        </tr>
                    </table>
                    <textarea name="row[payslip_type]" class="form-control hide" cols="30" rows="5">{$payslip_type_json|default=''}</textarea>
                    <script id="files_tpl" type="text/html">
                        <tr>
                            <td>
                                <input type="hidden" name="<%=name%>[<%=index%>][id]" class="form-control type_id" value="<%=row.id%>" data-rule="required" />
                                <input type="text" name="<%=name%>[<%=index%>][name]" class="form-control type_name" value="<%=row.name%>" data-rule="required" />
                            </td>
                            <td class="text-center">
                                <a class="edit_but btn-dragsort">移动</a>|<a class="del_but btn-remove">删除</a>
                            </td>
                        </tr>
                    </script>
                </div>
            </div>
            <div class="pop_but">
                <button type="submit" class="layui-btn layui-btn-determine">确定</button>
            </div>
        </form>
    </div>
</div>

<div class="pop scgzb_pop">
    <div class="pop_content">
        <div class="layui-card-header">上传工资表</div>
<!--        <div class="close iconfont icon-guanbi"></div>-->
        <div class="layui-card-body">
            <div class="scgzb_item">
                <dl>
                    <dd>发薪类型：<span class="type_name"></span></dd>
                    <dd>发薪月份：<span class="month_name"></span></dd>
                    <dt>表格名称：<span class="file_name"></span></dt>
                </dl>
            </div>
            <div class="scgzb_item2">
                <p>上传进度</p>
                <div class="layui-progress" lay-filter="number">
                    <div class="layui-progress-bar" lay-percent="0%"></div>
                </div>
                <div class="progress_text">0%</div>
            </div>
            <div class="scgzb_item3 hide">
                <p>
                    导入成功：<span class="import_success"></span>条，导入失败：<span class="import_error"></span>条
                    <a class="color_4873C1 error_msg hide">【下载导入失败原因】</a>
                </p>
                <p>
                    匹配成功：<span class="batch_success"></span>条，匹配失败：<span class="batch_error"></span>条
                    <a class="color_4873C1 batch_msg hide">【手动】</a>
                </p>
            </div>
        </div>
        <div class="pop_but hide">
            <a href="javascript:;" class="layui-btn layui-btn-determine">确定</a>
        </div>
    </div>
</div>